/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
$(function(){
   
});
$(document).ready(function(){
    $("form").validate({
        rules:{
            name:{required:true},
            lastName:{required:true},
            gender:{required:true},
            phoneNumber:{required:true},
            email:{required:true},
            birthdate:{required:true},
            company :{required:true},
            profileName :{required:true},
            password :{required:true},
            rpassword :{
                equalTo: "#password"}
        },
        messages:{
            name:{required:"* Por favor escriba su nombre."},
            lastName:{required:"* Por favor escriba su apellido."},
            gender:{required:"* Por favor indique su género"},
            phoneNumber:{required:"* Escriba su número telefónico."},
            email:{required:"* Se requiere su dirección correo electrónico."},
            birthdate:{required:"* Escriba su fecha de nacimiento."},
            company :{required:"* Escriba su escuela o empresa."},
            profileName :{required:"* Se requiere un nombre de perfil."},
            password :{required:"* Se requiere una contraseña."},
            rpassword :{equalTo: "* Las contraseñas no coinciden"}
        }
    });
    
    
    AnyTime.picker("birthdate",
                      { labelDayOfMonth: "Día del Mes",
                      	labelMonth:"Mes",
                        labelYear: "Año",
                      	labelTitle: "Seleccione una fecha",
                      	monthAbbreviations: new Array("Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"),
						dayAbbreviations: new Array("Dom","Lun","Mar","Mie","Jue","Vie","Sab"),                      	                      					
                        format: "%Y-%m-%d", firstDOW: 1
                      });
   var input = document.getElementById ("birthdate");
   input.style.background='#FFFFFF url("public/images/calendar_icon.jpg") no-repeat right';
   
   
});


